package com.cqeec.demo.service;

import com.cqeec.demo.entity.Book;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service
@ToString
public class BookService {
    /**
     * 考虑将其中一个bean标记为@Primary，
     * 更新消费者以接受多个bean，
     * 或使用@Qualifier来标识应该被消费的bean
     */
    @Qualifier("loveme")
    @Autowired
    Book book;
}